import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpUsersPaper {
  id!: number;
  paperId!: number;
  userId!: number;
  time?: string;
  uniacid?: number;
  buyType: boolean = true;
}

export const ImsYzdKpUsersPaperSchema = new EntitySchema({
  class: ImsYzdKpUsersPaper,
  properties: {
    id: { primary: true, type: 'number' },
    paperId: { type: 'number' },
    userId: { type: 'number', index: 'user_id' },
    time: { type: 'string', length: 255, nullable: true },
    uniacid: { type: 'number', nullable: true, index: 'uniacid' },
    buyType: { type: 'boolean', default: true },
  },
});
